package yxy.cherry.battle.module.affix.buff;

import yxy.cherry.battle.Battle;
import yxy.cherry.battle.Fighter;
import yxy.cherry.battle.module.affix.AffixFactory.BuffTypeEnum;
import yxy.cherry.battle.module.affix.Buff;
import yxy.cherry.battle.module.affix.BuffType;
import yxy.cherry.data.bean.skill;

/** 嘲讽 */
@BuffType(Type = BuffTypeEnum.嘲讽)
public class Affix_58_嘲讽 extends Buff {

	public Affix_58_嘲讽(Fighter source, Fighter target, skill skilldata, int[] params) {
		super(source, target, skilldata, params);
	}

	@Override
	public boolean exec(Fighter source, Fighter actor) {
		if (!source.is活着()) {
			return false;
		}

		// XXX 预设目标
		getAffixContext().get攻击行动().clear目标们();
		getAffixContext().get攻击行动().addTarget(source);
		getAffixContext().set跳过怒气技能(true);
		Battle.battleLogger(6,"嘲讽：攻击对象改为"+source.getName()+"并跳过怒气技能");
		return true;
	}

	@Override
	public BuffType getBuffType() {
		return BuffType.控制效果;
	}

	@Override
	public BuffStateType getBuffStateType() {
		return BuffStateType.嘲讽状态;
	}
}